
rem get dist's name
%~d0
rem turn to the path of this script
cd %~dp0
rem find package's name
dir /b|findstr /e ".jar">a.txt
set/p packagename=<a.txt
del a.txt

:loop
for /f "tokens=1* delims= " %%i in ("%packagename%") do (
set packagename=%%j
set titlename=%%i
)
if defined packagename goto :loop

rem display name is package's name
title %titlename%
java -Dloader.path=libs -Xms128m -Xmx256m -jar %titlename%
pause
